package com.blog.cloud.service;

import com.blog.cloud.comm.modal.pojo.User;
import com.blog.cloud.comm.webutils.DateUtils;
import com.blog.cloud.comm.webutils.GetWaterId;
import com.blog.cloud.dao.UserDao;

public class UserService {
	
	public static UserService ser = new UserService();
	
	public void insertUser(String userName , String userMail , String password){
		User user = new User();
		user.setSerialId(GetWaterId.getWaterId());
		user.setUserNo(GetWaterId.getWaterId());
		user.setUserName(userName);
		user.setUserMail(userMail);
		user.setUserPwd(password);
		user.setRegType("0");
		user.setIsDelete("1");
		String currDateTime = DateUtils.getCurrDateTime();
		user.setCreateTime(currDateTime);
		user.setUpdateTime(currDateTime);
		UserDao.me.insert(user);
	}
	
	
	
	public User selectUserByEmail(String email , String pwd){
		return UserDao.me.selectUserByEmail(email, pwd);
	}

}
